package com.service;

import com.dao.TypeDao;
import com.entity.Types;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



import java.util.List;

@Service
public class TypeService {

    @Autowired
    private TypeDao typesDao;

    /*
    * 获取列表
    * */
    public List<Types> getList(){
        return typesDao.selectList();
    }

    /*
    * 通过id查询
    * */
    public Types get(int id){
        return typesDao.select(id);
    }

    /*
    * 添加
    * */
    /*public boolean add(Types type){
        return typesDao.insert(type);
    }*/
}
